package com.itheima.crops.feign;

import com.itheima.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "crops")
public interface IndexFeign {
    /**
     * 农作物指标根据id查询
     * @param id
     * @return
     */
    @GetMapping("/index/findById/{id}")
    public Result findById(@PathVariable("id") Integer id);

    /**
     * 农作物指标全查
     * @return
     */
    @GetMapping("/index/findAll")
    public Result findAll();
}
